package com.xxgc.eow.service.impl;

import com.xxgc.eow.entity.Note;
import com.xxgc.eow.mapper.NoteMapper;
import com.xxgc.eow.service.INoteService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 笔记 服务实现类
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-23
 */
@Service
public class NoteServiceImpl extends ServiceImpl<NoteMapper, Note> implements INoteService {

    @Resource
    private NoteMapper noteMapper;

    @Override
    public List<Note> getNoteByUserIdAndTopicId(Integer userId, Integer topicId) {
        return noteMapper.selectNoteByUserIdAndTopicId(userId, topicId);
    }

    @Override
    public List<Note> getNotesByUserId(Integer userId) {
        return noteMapper.selectNotesByUserId(userId);
    }
}
